import { defineAsyncComponent, ref } from 'vue'

export const AsyncComp = defineAsyncComponent(() => {
  return new Promise((resolve, reject) => {
    // ...从服务器获取组件
    const re = {
      loader: {
        template:'<div>这是一个简单的示例：{{msg}}</div>',
        setup() {
          const msg = ref('ss')
        }
      }
    }
    resolve(re)
  })
})